package com.platform.qujia.service.impl;

import com.platform.qujia.service.WxTemplateParamsGeneral;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component("RefundSuccess")
public class RefundSuccessParams implements WxTemplateParamsGeneral {
    @Override
    public void setWxTemplateContent(List<String> contents, Map<String, String> templateParams, Map<String, Map<String, String>> data) {
        if(contents.contains("油站名称")){
            data.put("thing6", Collections.singletonMap("value", templateParams.get("stationName")));
        }

            data.put("thing11", Collections.singletonMap("value", templateParams.get("productName")));

        if (contents.contains("退款金额")) {
            data.put("amount4", Collections.singletonMap("value", templateParams.get("amt")));
        }
        if (contents.contains("退款时间")) {
            data.put("time5", Collections.singletonMap("value", templateParams.get("refundDate")));
        }
    }
}
